const express = require("express");
const router = express.Router();

const MySql = require("../lib/mysql");

router.post("/userEdu",async(req,res,next) => {



    const userId = req.body.id;
    const id = req.body.user_id;
    const start = req.body.start_time;
    const end = req.body.end_time;
    const eduExp = req.body.education_exp;
    const diploma = req.body.diploma;

        const resInsert = await MySql.query('insert education_exp(id,user_id,start_time,end_time,education_exp,diploma) values(?,?,?,?,?,?)',[id,userId,start,end,eduExp,diploma])
        
        res.json({
            id:resInsert.insertId,
            code:1,
            message:'edu保存成功',
        })

});

module.exports = router;